
//
//  XGGifHeader.m
//  HelloTest
//
//  Created by 薛小刚 on 2018/4/17.
//  Copyright © 2018年 薛小刚. All rights reserved.
//

#import "XGGifHeader.h"

@implementation XGGifHeader


- (void)prepare
{
    [super prepare];
    // 初始化间距
    self.labelLeftInset = 20;
    self.ignoredScrollViewContentInsetTop = -10;
    self.stateLabel.hidden = YES;
    self.lastUpdatedTimeLabel.hidden = YES;
    
    NSArray * array0 = @[[UIImage imageNamed:@"refresh0"], [UIImage imageNamed:@"refresh1"], [UIImage imageNamed:@"refresh2"], [UIImage imageNamed:@"refresh3"], [UIImage imageNamed:@"refresh4"], [UIImage imageNamed:@"refresh5"], [UIImage imageNamed:@"refresh6"], [UIImage imageNamed:@"refresh7"], [UIImage imageNamed:@"refresh8"]];
    NSArray * array1 = @[[UIImage imageNamed:@"refresh8"]];
    NSArray * array2 = @[[UIImage imageNamed:@"refresh0"], [UIImage imageNamed:@"refresh1"], [UIImage imageNamed:@"refresh2"], [UIImage imageNamed:@"refresh3"], [UIImage imageNamed:@"refresh4"], [UIImage imageNamed:@"refresh5"], [UIImage imageNamed:@"refresh6"], [UIImage imageNamed:@"refresh7"], [UIImage imageNamed:@"refresh8"], [UIImage imageNamed:@"refresh7"], [UIImage imageNamed:@"refresh6"], [UIImage imageNamed:@"refresh5"], [UIImage imageNamed:@"refresh4"], [UIImage imageNamed:@"refresh3"], [UIImage imageNamed:@"refresh2"], [UIImage imageNamed:@"refresh1"], [UIImage imageNamed:@"refresh0"]];
    
    //
    [self setImages:array0 forState:MJRefreshStateIdle];
    [self setImages:array1 forState:MJRefreshStatePulling];
    // 设置正在刷新状态的动画图片
    [self setImages:array2 duration:0.3 forState:MJRefreshStateRefreshing];
}


@end
